"RezLib is an attempt to unify display color depth and resolution
switching, gamma fading, and vertical retrace synchronization
under a common API for both MacOS 8/9 and MacOS X. It is provided
free of charge as a shared library for use under Carbon."
RezLib is written by Ian Ollman
See www.versiontracker.com or do a Google search, to find the latest version of RezLib
*/
#if CarbonLib == 0
compile shutdown "RezLib requires Carbon"
#endif
begin record RLInfo
dim as UInt32 resolutionID //unique identifier for this rez/color depth combo
dim as UInt32 refreshRate //16.16 fixed point in Hz
dim as UInt32 height //height in pixels
dim as UInt32 width //width in pixels
dim as UInt32 colorDepths //colordepths allowed at this rez in bits -- i.e. if 8 and 32 bit color depths were alowed, the value would be 8 | 32 = 40 (=0x00000028). GetCurrentScreenSetting returns only the color depth currently in use.
dim as UInt16 flags //See RLInfo flags below
dim as Boolean isSafe //True if the resolution is known to function correctly. If false, it may still work, but you need to test.
dim as char rlInfoType //Reserved for later use. Pass 0 here.
dim as Str31 name //Name of this setting as a pascal string
end record
begin record RLDrawInfo
dim as Ptr baseAddr
dim as UInt32 rowBytes
dim as UInt32 bitsPerPixel
dim as Rect bounds
dim as UInt32 reserved //Unused. Pass 0 here
end record
/* RLInfo flags */
_rlDisplayModeIsStretched = 1 /*Set if the resolution is distorted. (e.g. 1024x768 stretched to fit a 1200x768 display) */
_rlDisplayModeRequresPanning = 2 /*Set if the entire resolution cannot fit on the screen at the same time -- panning is required. */
_rlDisplayModeInterlaced = 4
_rlDisplayModeMatchingBits = _rlDisplayModeIsStretched or _rlDisplayModeRequresPanning or _rlDisplayModeInterlaced
// ScreenRef is a opaque pointer to a class that handles one display.